package com.qd.common.panda.domain.entity.stroke;

import com.cdqidi.util.page.BaseQuery;
import com.cdqidi.valid.group.DefaultGroup;
import com.cdqidi.valid.group.DeleteGroup;
import com.cdqidi.valid.group.UpdateGroup;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;


/**
 * 加油订单
 *
 * @author sjk
 */
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
public class UserStrokeOrderGasDTO extends BaseQuery {

    /**
     * 主键
     */
    @NotBlank(message = "订单ID不能为空", groups = {DeleteGroup.class, UpdateGroup.class})
    @Size(max = 50, message = "订单ID长度不能超过{max}位", groups = {DeleteGroup.class, UpdateGroup.class})
    private String orderId;
    /**
     * 加油站公司ID
     */
    @Size(max = 64, message = "加油站公司ID长度不能超过{max}位", groups = DefaultGroup.class)
    private String gasStationCompanyId;
    /**
     * 加油站公司名称
     */
    @Size(max = 200, message = "加油站公司名称长度不能超过{max}位", groups = DefaultGroup.class)
    private String gasStationCompanyName;
    /**
     * 油号
     */
    private Integer octaneNumber;
    /**
     * 枪号
     */
    @NotBlank(message = "枪号不能为空", groups = DefaultGroup.class)
    @Size(max = 20, message = "枪号长度不能超过{max}位", groups = DefaultGroup.class)
    private String nozzleNumber;
    /**
     * 单价
     */
    @NotNull(message = "单价不能为空", groups = DefaultGroup.class)
    private BigDecimal price;
    /**
     * 行程ID
     */
    @Size(max = 50, message = "行程ID长度不能超过{max}位", groups = DefaultGroup.class)
    private String sid;
    /**
     * 加油量
     */
    private Double oilVolume;
    /**
     * 油站类型
     */
    private String stationType;
    /**
     * 油站类型显示
     */
    private String stationTypeDisplay;

    @Override
    public void freeData() {
        this.orderId = null;
        this.gasStationCompanyId = null;
        this.gasStationCompanyName = null;
        this.octaneNumber = null;
        this.nozzleNumber = null;
        this.price = null;
        this.sid = null;
        this.oilVolume = null;
        this.stationType = null;
        this.stationTypeDisplay = null;
        super.freeData();
    }
}
